package com.yzh.luckydraw.domain.activity.service.partake;

import com.yzh.luckydraw.common.Result;
import com.yzh.luckydraw.domain.activity.model.req.PartakeReq;
import com.yzh.luckydraw.domain.activity.model.res.PartakeResult;
import com.yzh.luckydraw.domain.activity.model.vo.ActivityPartakeRecordVO;
import com.yzh.luckydraw.domain.activity.model.vo.DrawOrderVO;
import com.yzh.luckydraw.domain.activity.model.vo.InvoiceVO;

import java.util.List;

/**
 * 抽奖活动参与接口
 */
public interface IActivityPartake {
    /**
     * 参与活动
     */
    PartakeResult doPartake(PartakeReq req);

    /**
     * 保存奖品单(user_take_activity中state改为1)
     * @param drawOrderVO
     * @return
     */
    
    Result recordDrawOrder(DrawOrderVO drawOrderVO);

    /**
     * 更新发货单MQ状态
     * @param uId
     * @param orderId
     * @param mqState
     */
    void updateInvoiceMqState(String uId, Long orderId, Integer mqState);

    /**
     * 扫描发货单MQ状态，把未发送MQ的单子扫描出来做补偿
     * @param db    指定库
     * @param tb    指定表
     * @return
     */
    List<InvoiceVO> scanInvoiceMqState(int db, int tb);

    /**
     * 更新活动库存
     * @param activityPartakeRecordVO 活动领取记录
     */
    void updateActivityStock(ActivityPartakeRecordVO activityPartakeRecordVO);
}
